:root {
    --primary-color: #1a73e8;
    --bg-color: #f8f9fa;
    --text-color: #202124;
    --border-color: #dadce0;
    --hover-color: #f1f3f4;
}

body {
    margin: 0;
    font-family: 'Google Sans', 'Microsoft YaHei', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
}

.container {
    display: flex;
    min-height: 100vh;
}

/* 左侧导航 */
.sidebar {
    width: 280px;
    background: white;
    border-right: 1px solid var(--border-color);
    padding: 24px 0;
    overflow-y: auto;
}
.logo {
    padding: 0 24px;
    margin-bottom: 32px;
    font-size: 24px;
    font-weight: 500;
    color: var(--primary-color);
}
.nav-group {
    margin-bottom: 8px;
}
.nav-header {
    padding: 12px 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-weight: 500;
}

.nav-header:hover {
    background: var(--hover-color);
}
.nav-header.arrow {
    transition: transform 0.3s;
}
.nav-header.active.arrow {
    transform: rotate(180deg);
}
.nav-content {
    display: none;
    padding: 8px 0;
    background: #f8f9fa;
}
.nav-content.show {
    display: block;
}
.nav-item {
    padding: 10px 32px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}
.nav-item:hover {
    background: var(--hover-color);
    color: var(--primary-color);
}
.nav-item.active {
    background: #e8f0fe;
    color: var(--primary-color);
}
/* 主内容区 */
.main-content {
    flex: 1;
    padding: 32px;
    display: flex;
    flex-direction: column;
    /*justify-content: space-between;*/
    gap: 32px;  /* Add spacing between upload and preview areas */
    max-width: 1200px;
    width: 100%;
    align-items: center;
}
.upload-preview-container {
    display: flex;
    gap: 32px; /* Space between upload and preview boxes */
    width: 100%; /* Set the width for the container */
    height: 70%;
}
.upload-area,
.preview-area {
    width: 48%; /* Each box takes up 48% of the width, leaving some space between */
}
/* 上传区域 */
.upload-area {
    border: 2px dashed var(--border-color);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
}
.upload-area.dragover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}
.upload-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}
.upload-content i {
    font-size: 48px;
    color: var(--primary-color);
}
.upload-text {
    font-size: 18px;
    color: var(--text-color);
    margin: 0;
}
.upload-hint {
    font-size: 14px;
    color: #666;
    margin: 0;
}
/* 预览区域 */
.preview-area {
    text-align: center;
    background: white;
    border-radius: 12px;
    padding: 24px;
    border: 2px solid var(--border-color);
}
#preview {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 8px;
}
/* 处理中提示 */
#loading {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 16px 32px;
    border-radius: 8px;
    display: none;
}

/*操作方框 */
.operation-box {
    width: 100%;
    heigh: 50%;
    textalign: center;
    bacground: white;
}

/*工具栏 */
.toolbar {
    padding: 16px;
    background: white;
    border-radius: 12px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
}
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary {
    background: var(--primary-color);
    color: white;
}
.btn-primary:hover {
    background: #1557b0;
}




/* Adjust the resize UI appearance */
.resize-container {
display: flex;
flex-direction: column;
gap: 16px;
padding: 24px;
background: linear-gradient(145deg, #f0f7ff, #e2e6f5);
border-radius: 12px;
box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.1);
transition: all 0.3s ease;
width: fit-content;
}

.resize-container:hover {
box-shadow: 0px 6px 25px rgba(0, 0, 0, 0.2);
}


/* Field styling */
.resize-field {
display: flex;
display: flex;  /* 使用flex布局 */
align-items: center;  /* 垂直居中 */
justify-content: space-between;  /* 水平分布 */
}
.resize-field label {
font-size: 16px;
font-weight: 500;
color: #333;
}
.resize-input {
padding: 12px;
font-size: 16px;
border: 1px solid #ccc;
border-radius: 8px;
transition: border-color 0.3s ease, background-color 0.3s ease;
}
.resize-input:focus {
border-color: var(--primary-color);
background-color: #f5f8ff;
outline: none;
}

.rotate-field {
margin-bottom: 20px;
display: flex;
align-items: center;
justify-content: space-between;
}

/* Button styling */
.resize-btn {
padding: 12px 24px;
background: #1a73e8;
color: white;
border: none;
border-radius: 8px;
font-size: 16px;
cursor: pointer;
transition: background 0.3s ease, transform 0.3s ease;
}
.resize-btn:hover {
background: #0c59d7;
transform: translateY(-2px);
}
.resize-btn:active {
transform: translateY(0);
}

.rotate-buttons {
display: flex;
justify-content: space-between;
}
.rotate-btn {
padding: 10px 20px;
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
cursor: pointer;
font-size: 16px;
transition: background-color 0.3s ease, transform 0.2s ease;
}
.rotate-btn:hover {
background-color: #0056b3;
transform: scale(1.05);
}
.rotate-btn:active {
background-color: #004080;
transform: scale(1);
}
.rotate-btn-left {
background-color: #28a745;
}
.rotate-btn-left:hover {
background-color: #218838;
}
.rotate-btn-right {
background-color: #ffc107;
}
.rotate-btn-right:hover {
background-color: #e0a800;
}
/* 输入框 */
input[type="number"] {
width: 120px;
padding: 12px;
border-radius: 10px;
font-size: 16px;
background: linear-gradient(45deg, #f0f0f0, #e0e0e0);
border: 2px solid #ccc;
outline: none;
transition: all 0.3s ease;
}
input[type="number"]:focus {
border-color: #007bff;
box-shadow: 0 0 8px rgba(0, 123, 255, 0.6);
background: linear-gradient(45deg, #e8f4fe, #d2e7fd);
}
input[type="number"]:hover {
border-color: #007bff;
}